NMEA 0183 Sentences

For a comprehensive explanation of the NMEA 0183 protocol please read

NMEA Revealed by Eric S. Raymond

Please note the 2008 Obsolete Nmea Sentences list in the Eric Raymond document.

Other References

OpenCPN does not use or recognize NMEA 2000

OpenCPN Core Program:

Normal prefix: “$” however AIS prefix: “!”

Recognized NMEA0183 Sentences

HDM - Heading, Magnetic

  1. Heading Degrees, magnetic
  2. M = magnetic

HDG - Magnetic heading, deviation, variation

  1. Magnetic Sensor heading in degrees
  2. Magnetic Deviation, degrees
  3. Magnetic Deviation direction, E = Easterly, W = Westerly
  4. Magnetic Variation degrees
  5. Magnetic Variation direction, E = Easterly, W = Westerly

If HDG message also contains the variation and E/W flags then O will use that. If not then it will look in RMC message for a variation. If nothing there it will use WMM plugin unless user has selected the variation manually in options.

HDT - Heading, True

  1. Heading Degrees, true
  2. T = True

To be sent by a navigation receiver when a destination waypoint is active.

''
                                                            14
        1 2   3 4    5    6       7 8        9 10  11  12  13|  15
        |   |   |   |    |   |       |   |        |   |   |   |   |   |   |
 $--RMB,A,x.x,a,c--c,c--c,llll.ll,a,yyyyy.yy,a,x.x,x.x,x.x,A,m,*hh<CR><LF>''

Field Number:

  1. Status, A= Active, V = Void
  2. Cross Track error - nautical miles
  3. Direction to Steer, Left or Right
  4. FROM Waypoint ID
  5. TO Waypoint ID
  6. Destination Waypoint Latitude
  7. N or S
  8. Destination Waypoint Longitude
  9. E or W
  10. Range to destination in nautical miles
  11. Bearing to destination in degrees True
  12. Destination closing velocity in knots
  13. Arrival Status, A = Arrival Circle Entered
  14. Status A - Data Valid, V - Data Invalid, FAA mode indicator (NMEA 2.3 and later)

RMB in a navigation sentence that combines GPS information with the coordinates of the Waypoint. The data it contains are the result of these calculations on the line that joins the position of the ship and the Waypoint. VMG is the right thing to do. VMG = SOG * cos (COG - BRG). It does not make sense to put the SOG in its place.

  1. Time (UTC)
  2. Status, V = Navigation receiver warning
  3. Latitude
  4. N or S
  5. Longitude
  6. E or W
  7. Speed over ground, knots
  8. Track Made Good, degrees true
  9. Date, ddmmyy
  10. Magnetic variation, degrees
  11. E or W
  12. Status A - Data Valid, V - Data Invalid, FAA mode indicator (NMEA 2.3 and later)

RMC in a sentence created only by the GPS (Or position system) based on the data received only by the receiver. There is no waypoint or route information. COG and SOG should appear here.

xxWPL - Waypoint Location

Used to send routes and waypoints up to a GPS receiver. OpenCPN does not process these sentences as input.

  1. Latitude
  2. N or S (North or South)
  3. Longitude
  4. E or W (East or West)
  5. Waypoint Name

xxRTE - Routes

Used to send routes and waypoints up to a GPS receiver.OpenCPN does not process these sentences as input.

  1. Total number of messages being transmitted
  2. Message Number
  3. Message Mode
    1. c = complete route, all waypoints
    2. w = working route, the waypoint you just left, the waypoint you're heading to, then all the rest
  4. Waypoint ID
  5. More Waypoints

GGA - Global Positioning System Fix Data

  1. Universal Time Coordinated (UTC)
  2. Latitude
  3. Longitude
  4. GPS Quality Indicator
  5. Number of satellites in view, 00 - 12
  6. Horizontal Dilution of Precision (HDOP)
  7. Antenna altitude above/below mean-sea-level (geoid)
  8. Units of antenna altitude, meters
  9. Geoidal separation, the vertical difference between the WGS-84 elipsoid and the geoid
  10. Units of geoidal separation, meters
  11. Age of differential GPS data, time in seconds since last SC104
  12. Differential reference station ID, 0000-102

GGA data is used to indicate the quality and number of satellites to fix the position. The boat becomes red and the 3 green bars when at maximum.

GLL - Geographic Position, Latitude / Longitude

  1. Latitude
  2. N or S (North or South)
  3. Longitude
  4. E or W (East or West)
  5. Time (UTC)
  6. Status A - Data Valid, V - Data Invalid, FAA mode indicator (NMEA 2.3 and later)

GSV - Satellites in view

  1. Number of sentences for full data / sentence 1 of 2
  2. Number of satellites in view
  3. Satellite PRN number
  4. Elevation, degrees
  5. Azimuth, degrees
  6. SNR - higher is better / for up to 4 satellites per sentence

VTG - Track Made Good and Ground Speed

  1. Track Degrees
  2. T = True
  3. Track Degrees
  4. M = Magnetic
  5. Speed Knots
  6. N = Knots
  7. Speed Kilometers Per Hour
  8. K = Kilometers Per Hour
  9. Status A - Data Valid, V - Data Invalid, FAA mode indicator (NMEA 2.3 and later)

GPwpl - Waypoint Data

Only when there is an active route (this is sometimes bidirectional).

APB - Autopilot Sentence "B"

This is a fixed form of the APA sentence with some ambiguities removed.

Note: Some autopilots, Robertson in particular, misinterpret “bearing from origin to destination” as “bearing from present position to destination”. This is likely due to the difference between the APB sentence and the APA sentence. for the APA sentence this would be the correct thing to do for the data in the same field. APA only differs from APB in this one field and APA leaves off the last two fields where this distinction is clearly spelled out. This will result in poor performance if the boat is sufficiently off-course that the two bearings are different.

Field Number:

  1. Status V = LORAN-C Blink or SNR warning V = general warning flag or other navigation systems when a reliable fix is not available
  2. Status V = Loran-C Cycle Lock warning flag A = OK or not used
  3. Cross Track Error Magnitude
  4. Direction to steer, L or R
  5. Cross Track Units, N = Nautical Miles
  6. Status A = Arrival Circle Entered
  7. Status A = Perpendicular passed at waypoint
  8. Bearing origin to destination
  9. M = Magnetic, T = True
  10. Destination Waypoint ID
  11. Bearing, present position to Destination
  12. M = Magnetic, T = True
  13. Heading to steer to destination waypoint
  14. M = Magnetic, T = True

XTE - Measured cross track error

Measured cross track error is a part of the RMB message, for compatibility with some older equipment designed to work with Loran.

  1. Cross track error, measured
  2. General warning flag V = warning
  3. (Loran-C Blink or SNR warning)
  4. Not used for GPS (Loran-C cycle lock flag)
  5. Cross track error distance
  6. L - Steer left to correct error (or R for right)
  7. N- Distance units - Nautical miles
  8. Status A - Data Valid, V - Data Invalid, FAA mode indicator (NMEA 2.3 and later)

AIVDM - Automatic Information System (AIS)

Sent by AIS handled by the AIS Decoder as an AIS target

Position reports from other vessels

  1. Time (UTC)
  2. MMSI Number
  3. Latitude
  4. Longitude
  5. Speed Knots
  6. Heading
  7. Course over Ground
  8. Rate of turn
  9. Navigation status

AIVDO - Automatic Information System (AIS)

Sent by AIS handled by the AIS Decoder as an AIS target (option)

Position reports from own vessel

  1. Latitude
  2. Longitude
  3. Speed over ground
  4. Course over ground
  5. MMSI, navigational status, ship type, call sign, destination, sizes (in AIS target list)

xxTTM

Sent by the Radar (ARPA / MARPA) and handled by the AIS Decoder in the same way as an AIS target

Tracked Target Message

  1. Target Number (0-99)
  2. Target Distance
  3. Bearing from own ship
  4. Bearing Units
  5. Target Speed
  6. Target Course
  7. Course Units
  8. Distance of closest-point-of-approach
  9. Time until closest-point-of-approach “-” means increasing
  10. “-” means increasing
  11. Target name
  12. Target Status
  13. Reference Target

xxTLL

Sent by the Radar and plugin radar_pi (ARPA / MARPA) and handled by the AIS Decoder in the same way as an AIS target

Target Latitude and Longitude

  1. Target Number (not used/ignored)
  2. Latitude
  3. Longitude
  4. Name
  5. Status
  6. Reference Target (not used/ignored)

xxOSD

Own Ship Data

  1. Heading, degrees true
  2. Status, A = Data Valid
  3. Vessel Course, degrees True
  4. Course Reference
  5. Vessel Speed
  6. Speed Reference
  7. Vessel Set, degrees True
  8. Vessel drift (speed)
  9. Speed Units

FPROS

GPSGate Buddy Position Update.

  1. Latitude
  2. Hemisphere N/S
  3. Longitude
  4. Hemisphere E/W
  5. Altitude in meters above sea level
  6. Speed over ground in knots
  7. Heading over ground in degrees
  8. Date
  9. Time UTC
  10. Name of buddy this position info belongs to.
1      2  3          4  5  6  7          8    9  10 11 12 13
|   |  |   |  |   |  |   |    |   |  |   |  |
$CDDSC,12,3380400790,12,06,00,1423108312,2019, ,  , S, E  *6A
  1. $CDDSC–from a DSC radio.
  2. 12–distress alert call.
  3. 3381581370–the MMSI of the sender.
  4. 12–category is “distress.”
  5. 06–Nature of Distress is“adrift.”
  6. 00–preferred follow-on communication by frequency- or phase-modulated simplex radio telephony.
  7. 1423108312–position, which 42-degrees 31-minutes latitude, 083-degrees 12-minutes longitude, in North and West.
  8. 0236–message was sent at 0236-UTC.
  9. 3381581370–now the new information! This is a repeat of the MMSI of the sender. Since I know this datagram comes from receiving a distress alert cancelation message, the repetition of the same MMSI in this field as in the sender's field must be significant. In ITU-Rec. M.493-13, in Table 4.2 there is a footnote, which says, “Distress acknowledgments where the transmitting MMSI and ship in distress MMSI are the same, the message should be interpreted as a self Cancel operation.” This sheds light on the nature of this field. This field must be “the address of vessel in distress” if the message is a distress acknowledgement message.
  10. [null]–still no signal in this field.
  11. S–end of sequence.
  12. [null]–no expansion message to follow since no “E” here.
    • 20–checksum.
1      2  3  4  5          6  7       8
|   |  |   |  |   |  |   |
$CDDSE,1, 1, A, 3380400790,00,45894494*1B
  1. $CDDSE–from a DSC radio. Since this followed a datagram that indicated an expansion message would follow, this datagram is a representation on the wired data link of that DSC expansion message.
  2. 1–based on similar coding seen in other datagrams, this field is likely to indicate the total number of datagrams that are part of this expansion message.
  3. 1–as suggested above, this is likely the number of this datagram in the message sequence. Since this is one of a total of one, this datagram contains all the data for the expansion message.
  4. A–to be determined.
  5. 3380400790–a ten-digit representation of the sender's MMSI.
  6. 00–this field of two-digits appears to be the expansion data specifier described in Table 1 of ITU-Rec.M821-1, but with the symbol representation in two-digits instead of three-digits. The leading “1” seems to not be used. (See modified table, above.) This field identifies the data that will follow in the next field. In this message, the data will be “enhanced position resolution.”
  7. 45894494–the data payload, which is eight digits. The first four are the decimal portion of the latitude minutes; the last four are the decimal portion of the longitude minutes. The latitude and longitude whole minutes were sent in the immediately preceding datagram. This is as specified in the ITU-Rec. M.821-1 in section 2.1.2.1
  8. *1B–checksum.

Not Used

Dashboard Plugin

Dashboard Plugin recognized NMEA 0183 sentences

MDA

Meteorological Composite (obsolete) This message is obsolete and NMEA recommends to use XDR transducer messages instead.
However, old instruments might still sending this message.
OpenCPN reads the second value “Barometric pressure, bars”, but only if the number provided is between 0.8 and 1.1
All other values are ignored.

''
$--MDA,x.x,I,**x.x,B**,x.x,C,x.x,C,x.x,x.x,x.x,C,x.x,T,x.x,M,x.x,N,x.x,M*hh<CR><LF> \\
|   |        |   |    |   |    |   |    |   |    | \\
|   |        |   |    |   |    |   |    |   |    Wind speed, meters/second \\
|   |        |   |    |   |    |   |    |        Wind speed, knots \\
|   |        |   |    |   |    |   |    Wind direction, degrees Magnetic     \\
|   |        |   |    |   |    |        Wind direction, degrees True \\
|   |        |   |    |   |    Dew point, degrees C \\
|   |        |   |    |    Absolute humidity, percent \\
|   |        |   |    Relative humidity, percent \\
|   |        |        Water temperature, degrees C \\
|   |        Air temperature, degrees C \\
|      **//Barometric pressure, bars// ** \\
Barometric pressure, inches of mercury''

XDR

Transducer Values

            1 2   3 4       n
|   |   |   |       | \\
*  $--XDR,a,x.x,a,c--c, ..... *hh<CR><LF> \\
Measured Value | Transducer Type | Measured Data   | Unit of measure | Transducer Name
------------------------------------------------------------------------------------------------------
barometric     | "P" pressure    | 0.8..1.1 or 800..1100           | "B" bar         | "Barometer"
air temperature| "C" temperature |   2 decimals                    | "C" celsius     | "TempAir" or "ENV_OUTAIR_T"
pitch          | "A" angle       |-180..0 nose down 0..180 nose up | "D" degrees     | "PTCH" or "PITCH"
rolling        | "A" angle       |-180..0 L         0..180 R       | "D" degrees     | "ROLL"
water temp     | "C" temperature |   2 decimals                    | "C" celsius     | "ENV_WATER_T"
-----------------------------------------------------------------------------------------------------

ZDA

Time & Date - UTC, day, month, year and local time zone This is one of the sentences commonly emitted by GPS units.

        1         2  3  4    5  6  7
        |   |  |   |    |   |  |
 $--ZDA,hhmmss.ss,xx,xx,xxxx,xx,xx*hh<CR><LF>

Field Number:

  1. UTC time (hours, minutes, seconds, may have fractional subsecond)
  2. Day, 01 to 31
  3. Month, 01 to 12
  4. Year (4 digits)
  5. Local zone description, 00 to + - 13 hours (- means East longitude)
  6. Local zone minutes description, 00 to +-59 (- means East longitude)
  7. Example: $GPZDA,160012.71,11,03,2004,-1,00*7D

NMEA version 2.3

Added a mode indicator to many sentences to indicate what kind of fix the receiver has. The value can be one of

Sometimes there can even be a null value as well.
The A and D are the only vales that will indicate an Active and reliable Sentence.
This mode character has been added to the end of RMC, RMB, VTG, and GLL sentences.
Optionally, to some others as well, including the BWC and XTE sentences.

Notes:

  1. For more details on how OpenCPN interprets all recognized sentences, look at the “AIS_DecoderA.cpp” file in the source code. For the Dashboard plugin, look at the different files in the “nmea0183” directory.